package main

import "fmt"

// make 创建 切片
func main() {

	a := make([]int, 5)

	for i := 0; i < len(a); i++ {
		a[i] = i * 2
	}
	fmt.Printf(" a : %v  len : %d  cap : %d \n", a, len(a), cap(a))

	a = append(a, 6)

	fmt.Printf(" a : %v  len : %d  cap : %d \n", a, len(a), cap(a))

	a = append(a, 7, 8, 9)
	fmt.Printf(" a : %v  len : %d  cap : %d \n", a, len(a), cap(a))

}
